﻿Imports VbExample.VbExample
Imports VbExample.CustomNameSpace

Partial Public Class _Default
	Inherits System.Web.UI.Page

	Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
		Label1.Text = String.Format("You clicked the button {0} times.", Profile.Counter)

	End Sub

	Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
		Profile.Counter += 1
	End Sub


	Public ReadOnly Property Profile() As MyWebProfile
		Get
			Return New MyWebProfile(HttpContext.Current.Profile)
		End Get
	End Property


End Class